package com.powerbank.common.event.order;

import lombok.Data;
import java.time.LocalDateTime;

/**
 * 订单支付事件
 */
@Data
public class OrderPaidEvent {

    /**
     * 订单ID
     */
    private Long orderId;

    /**
     * 订单号
     */
    private String orderNo;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 设备ID
     */
    private Long deviceId;

    /**
     * 支付ID
     */
    private String paymentId;

    /**
     * 创建时间
     */
    private LocalDateTime createdTime;

    public OrderPaidEvent() {
        this.createdTime = LocalDateTime.now();
    }

    public OrderPaidEvent(Long orderId, String orderNo, Long userId, Long deviceId, String paymentId) {
        this.orderId = orderId;
        this.orderNo = orderNo;
        this.userId = userId;
        this.deviceId = deviceId;
        this.paymentId = paymentId;
        this.createdTime = LocalDateTime.now();
    }
}